<?php

namespace App\Jobs;

use App\Constant\QueueKey;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use App\Library\Source\Rong360\Rong360Request;

class NotifyBindCardStatus implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public $tries = 3;

    public $timeout = 30;

    public $data;
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        //
        $this->data = $data;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //todo
        $rong360Request = new Rong360Request();
        $rong360Request->pushBindCardResult($this->data['order_no'], $this->data['status'], $this->data['type'], $this->data['msg']);
//        \Log::info($this->data);
//        echo '调用第三方通知接口';
    }
}
